package com.zhengxiang.onlinexamination.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.alibaba.fastjson2.function.impl.ToInteger;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.google.gson.annotations.JsonAdapter;
import com.zhengxiang.onlinexamination.base.BaseEntity;
import com.zhengxiang.onlinexamination.base.IntTypeAdapter;
import lombok.Data;

import java.util.Date;
import java.io.Serializable;

/**
 * 题目答案(ZQuAnswer)实体类
 *
 * @author
 * @since 2023-03-09 17:30:03
 */
@Data
@TableName("qu_answer")
public class QuAnswer extends BaseEntity implements Serializable {

    @TableId(type = IdType.AUTO)
    private Integer quAnswerId;
    /**
     * 题目id
     */
    private Integer quId;
    /**
     * 答案选项
     */
    private String answerOption;
    /**
     * 是否是正确答案 0否 1是
     */
    @JSONField(deserializeUsing=IntTypeAdapter.class)
    private Integer answerCorrect;
    /**
     * 答案内容
     */
    private String quAnswerContent;
    /**
     * 答案解析
     */
    private String answerAnalysis;
    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date createTime;
    /**
     * 更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date updateTime;

}

